package com.wbl.train.common.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author 王博纶
 * @since 2024-02-02
 * @description 火车车厢
 */
@Data
@Accessors(chain = true)
@TableName("train_carriage")
@Schema(name = "TrainCarriage 对象", description = "火车车厢 实体类")
public class TrainCarriageEntity {

    @Schema(description = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @NotNull(message = "车次编号不能为空")
    @Schema(description = "车次编号")
    private String trainCode;

    @NotNull(message = "厢号不能为空")
    @Schema(description = "厢号")
    private Integer carriageIndex;

    @NotNull(message = "座位类型不能为空")
    @Schema(description = "座位类型|枚举[SeatTypeEnum]")
    private String seatType;

    @Schema(description = "座位数")
    private Integer seatCount;

    @NotNull(message = "排数不能为空")
    @Schema(description = "排数")
    private Integer rowCount;

    @Schema(description = "列数")
    private Integer colCount;

    @Schema(description = "新增时间")
    private Date createTime;

    @Schema(description = "修改时间")
    private Date updateTime;


}
